function bciSelectFrequencies(freqs)

global GLOBALbci;

if nargin==0 || isempty(freqs),
    fprintf('All frequencies selected.\n');
    GLOBALbci.init.featOfInterest = 1:length(GLOBALbci.param.freq);
else
    freqIdx = zeros(size(freqs));
    for fr=1:length(freqs),
        idx = find(GLOBALbci.param.freq==freqs(fr));
        if isempty(idx),
            error('Frequency %i not found.',freqs(fr));
        else
            freqIdx(fr)=idx;
        end
    end
    GLOBALbci.init.featOfInterest = freqIdx;
end